"use client"

import Link from "next/link"
import { usePathname } from "next/navigation"
import { ShoppingCart, Heart, Package } from "lucide-react"

export function Navigation() {
  const pathname = usePathname()

  if (pathname === "/login") return null

  return (
    <nav className="border-b">
      <div className="container mx-auto px-4">
        <div className="flex items-center justify-between h-16">
          <Link href="/" className="text-xl font-bold">
            商城
          </Link>
          <div className="flex items-center gap-6">
            <Link href="/cart" className="flex items-center gap-1 text-sm hover:text-blue-600 transition-colors">
              <ShoppingCart className="w-5 h-5" />
              购物车
            </Link>
            <Link href="/favorites" className="flex items-center gap-1 text-sm hover:text-blue-600 transition-colors">
              <Heart className="w-5 h-5" />
              收藏
            </Link>
            <Link href="/orders" className="flex items-center gap-1 text-sm hover:text-blue-600 transition-colors">
              <Package className="w-5 h-5" />
              订单
            </Link>
          </div>
        </div>
      </div>
    </nav>
  )
}

